package com.sdap2.entity;

import com.sdap2.common.entity.LogicEntity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@Data
@Entity
@Table(name = "sys_role")
@EqualsAndHashCode(callSuper = true)
public class SysRole extends LogicEntity {
    
    @Column(name = "role_name", length = 50, nullable = false)
    private String roleName;
    
    @Column(name = "role_code", length = 50, nullable = false)
    private String roleCode;
    
    @ManyToMany(mappedBy = "roles")
    private List<SysUser> users;
} 